package controllers

import (
	"os"
	"time"
)

type Test struct {
	BaseController
}

// @router /test [get,post]
func (c *Test) Test() {

	//common.SetCache("name", "14728285gsdfsdfd", 20*time.Second)

	c.Cache.SetFileCache("name", "14728285gsdfsdfd", 200*time.Second)

	c.Data["json"] = c.Cache.GetFileCache("name")
	c.ServeJSON()
}

// @router /testget [get,post]
func (c *Test) Info() {

	/*
		github.com/xormplus/xorm
			使用该orm
	*/

	c.Data["json"] = os.Environ()
	c.ServeJSON()

}
